<?php 

if (Session::User())
{
	throw new ArchException('Incorrect access to registration method. User now logged.');
}

sys::uses('auth/profile');

function nameCommonSpaceDecoder($nameInCommon)
{
	$prefix = 'data-';
	return strpos($nameInCommon, $prefix) === 0 
		? substr($nameInCommon, strlen($prefix)) 
		: $nameInCommon; 
}

AuthProfile::register(
	ar::keyProc('nameCommonSpaceDecoder', 
		ar::regexFilterByKeys('/^data-/u', 
			Request::getParams()
		)
	)
);

?>